/* define params and function */


/* colors */
cl-red = #ff6767;
cl-black = #191919;
cl-blue = #00a0e9;
cl-grey = #f8f8f8;
cl-dark-grey = #a6a6a6;
cl-demo = #111222;

/* xinhuashe 5.0 common color*/
x5-bg-grey = #f5f5f5;
x5-grey = #90A2B0;
x5-btn-grey= #8A9AA6;
x5-blue = #008adc;
x5-dark-blue = #4A90E2;
x5-red = #E74D4D;
x5-light-grey = #CDCED3;
x5-black = #1c1c1c;

/* font size */
xs-font = rem(16)
s-font = rem(20)
m-font = rem(24)
l-font = rem(32)

/*label&btn color*/
btn-red=label-cl-red = #e74d4d; 
btn-blue=label-cl-blue = #4a90e2;
label-cl-purple = #484967;
label-cl-peach = #ff7979;
btn-grey=label-cl-grey = #90a2b0

/* 时间戳 */
$timestamp = "{{#timestamp}}"

/* rem 750 */
rem()
  (round(arguments / 75 * 100 - 0.2) / 100)rem

/* clear float */
clearfix()
  &:after
    visibility hidden
    display block
    font-size 0
    content " "
    clear both
    height 0
    
/* 文本超长截断省略 */
fn-ellipsis()
  white-space nowrap
  text-overflow ellipsis
  overflow hidden
  
fn-ellipsis2()
  word-break break-all
  display -webkit-box
  -webkit-line-clamp 2
  -webkit-box-orient vertical
  overflow hidden
  
fn-ellipsis3()
  word-break break-all
  display -webkit-box
  -webkit-line-clamp 3
  -webkit-box-orient vertical
  overflow hidden
  
/* 按钮 */
btn-block()
  display block
  height rem(60)
  color #fff
  font-size rem(24)
  line-height rem(60)
  text-align center
  background-color x5-blue
  border-radius rem(10)
btn-inline()
  display inline-block
  padding rem(0) rem(20)
  height arguments[0]
  color #fff
  line-height arguments[0]
  font-size rem(24)
  text-align center
  background-color x5-blue
  border-radius arguments[1]
  
/* 卡片 */
card-col1()
  margin arguments
  background-color #fff
  border rem(1) solid #dbdce1
  border-radius rem(8)
  box-shadow 0 rem(2) rem(8) rgba(#000, .1)
  
/* 裁剪圆 */
round-img()
  width arguments
  height arguments
  border-radius 50%
  overflow hidden
  img
    width 100%
    height 100%
  
/* 不同设备像素比使用不同的小图标 */
backgroundurl(path, type)
  @media(-webkit-min-device-pixel-ratio: 1),(min-resolution: 1dppx)
    background-image url(path + "." + type)
  @media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx)
    background-image url(path + "@2x." + type)
